How to forbid postfix to send to external domains [closed]

Posted by elhoim on Super User See other posts from Super User or by elhoim
Published on 2011-02-09T14:01:27Z Indexed on 2011/02/09 15:27 UTC
Read the original article Hit count: 169

Filed under:
|
|

I have a local postfix server, and i want it to only relay emails to the only local domain (localdomain.be):

myhostname = localdomain.be
mydomain = localdomain.be
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname

relay_domains = $mydomain
default_transport = smtp
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24
mailbox_size_limit = 64000000
message_size_limit = 1000000
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_host_lookup = native

This configuration works fine to allow relay mail locally and on external destination domains, but i would like it to be an impossibility to send to other domains (ie: gmail.com).

relay_domains is supposed to ensure that but it does not seem to really filter since i can still send to my gmail address.

© Super User or respective owner

Related posts about email

Related posts about security